<html>
<head><meta charset="utf-8"><title>Reorg Redux · t-compiler/wg-rustc-dev-guide · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/index.html">t-compiler/wg-rustc-dev-guide</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html">Reorg Redux</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="223000991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg%20Redux/near/223000991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iñaki Garay <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html#223000991">(Jan 16 2021 at 19:23)</a>:</h4>
<p>I figured out how to do redirects in github pages, I tested it out on my own mdbook site. </p>
<p>When moving <code>src/old/path/to/fascinating.md</code> to <code>src/new/path/to/fascinating.md</code>, dropping a <code>src/old/path/to/fascinating.html</code> file into the appropriate path with contents such as </p>
<div class="codehilite" data-code-language="HTML"><pre><span></span><code><span class="cp">&lt;!DOCTYPE html&gt;</span>
<span class="p">&lt;</span><span class="nt">meta</span> <span class="na">charset</span><span class="o">=</span><span class="s">"utf-8"</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">title</span><span class="p">&gt;</span>Redirecting<span class="p">&lt;/</span><span class="nt">title</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">meta</span> <span class="na">http-equiv</span><span class="o">=</span><span class="s">"refresh"</span> <span class="na">content</span><span class="o">=</span><span class="s">"0; URL=https://rustc-dev-guide.rust-lang.org/new/path/to/fascinating.html"</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">"canonical"</span> <span class="na">href</span><span class="o">=</span><span class="s">"https://rustc-dev-guide.rust-lang.org/new/path/to/fascinating.html"</span><span class="p">&gt;</span>
</code></pre></div>
<p>will do the trick. </p>
<p>We can <br>
a) do that and we can see what it looks like and how bad it is, or <br>
b) we could drop all redirect files into a special folder and copy them to the correct locations as part of the render and deploy step. </p>
<p>and in some planned future, remove all the redirect htmls from the sources.</p>



<a name="223001207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg%20Redux/near/223001207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iñaki Garay <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html#223001207">(Jan 16 2021 at 19:27)</a>:</h4>
<p>I guess the canonical link is not really necessary</p>



<a name="223002462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg%20Redux/near/223002462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html#223002462">(Jan 16 2021 at 19:55)</a>:</h4>
<p>You could also maybe write a small script that would have a list of all the old locations and new locations and automatically generate these files in the <code>book/</code> directory.</p>



<a name="223002585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg%20Redux/near/223002585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iñaki Garay <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html#223002585">(Jan 16 2021 at 19:58)</a>:</h4>
<p>I think I like generating them off a config file more than committing them into the source</p>



<a name="223002656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg%20Redux/near/223002656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html#223002656">(Jan 16 2021 at 20:00)</a>:</h4>
<p>Well, that would be even better, but it will also be harder/more work for you :)</p>



<a name="223002831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg%20Redux/near/223002831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iñaki Garay <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html#223002831">(Jan 16 2021 at 20:04)</a>:</h4>
<p>I'll try writing a bash script to try with one, so as to set up the system.<br>
Am I correct in thinking that I should add it to the <code>ci</code> folder, and then add a step in the <code>.travis.yml</code> file under the <code>script:</code> entry?</p>



<a name="223002855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg%20Redux/near/223002855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html#223002855">(Jan 16 2021 at 20:06)</a>:</h4>
<p>I'm not certain, but that sounds right.</p>



<a name="223003810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg%20Redux/near/223003810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html#223003810">(Jan 16 2021 at 20:16)</a>:</h4>
<p>FYI, mdbook has built-in support for redirects.</p>



<a name="223003812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg%20Redux/near/223003812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iñaki Garay <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html#223003812">(Jan 16 2021 at 20:16)</a>:</h4>
<p>dangit parsing yam with bash is less than fun xD</p>



<a name="223003824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg%20Redux/near/223003824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iñaki Garay <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html#223003824">(Jan 16 2021 at 20:16)</a>:</h4>
<p>reading docs seems like less work, thanks <span class="user-mention" data-user-id="120518">@Eric Huss</span></p>



<a name="223003968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg%20Redux/near/223003968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iñaki Garay <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html#223003968">(Jan 16 2021 at 20:19)</a>:</h4>
<p>for <a href="https://rust-lang.github.io/mdBook/format/config.html?highlight=redirect#html-renderer-options">reference</a></p>



<a name="223066185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg%20Redux/near/223066185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Iñaki Garay <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/Reorg.20Redux.html#223066185">(Jan 17 2021 at 22:04)</a>:</h4>
<p>I'm settling into this nice rhythm of doing some preliminary work during the week, and then trying to close them out during "rustc-dev-guide sunday afternoons". This week I did the toc issue, next week I'll get back to the reorg :D</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>